package com.itheima.file;

import java.io.File;
import java.io.IOException;

public class Demo1 {
    public static void main(String[] args) throws IOException {
        //newFileOne();
        newFileTwo();
        //newFileThree();

//        boolean newFile = file1.createNewFile();
//        boolean newFile1 = file2.createNewFile();
//        boolean newFile2 = file3.createNewFile();

    }

    public static void newFileThree() {
        File file3=new File("D:\\黑马视频\\file\\filetest","demo3");
        System.out.println(file3);
    }

    public static void newFileTwo() throws IOException {
        File file2=new File("D:\\黑马视频\\file\\filetest\\demo2\\demo2.txt");
        System.out.println(file2.createNewFile());
        System.out.println(file2);
    }

    public static void newFileOne() {
        File file1=new File("D:\\黑马视频\\file\\filetest\\file","demo1");
        System.out.println(file1);
        System.out.println(file1.isDirectory());
        System.out.println(file1.isFile());
        System.out.println(file1.exists());
        System.out.println(file1.mkdirs());

    }
}
